Somewhere along the way (recently) the ctags interface has grown an issue. Just reproduced
this with:
jEdit 5.2pre1 - daily downloaded 11/5/2013
Windows 7 Enterprise SP1
Java 1.7.0_45
Start with a fresh settings directory
Install plugins CtagsInterface, CtagsSideKick, ProjectViewer (and those dependencies
automatically selected) from Plugin Manager
Set the Ctags path in both CtagsInterface and CtagsSideKick plugin settings
Set CtagsInteface tag preview dockable to follow caret
Create a project and add all files (I used the ctags source directory)
Add the project to the tags database by right clicking in Project Viewer
Open a source file (I used c.c)
Dock SideKick and Tag Preview where they are visible (I chose left and bottom, respectively)
Click on a tagged value (like KEYWORD_BOOLEAN for example)
Observe that both the sidekick and tag preview dockables show the correct tag & line
Add a few blank lines above the tag and save the source file
Problem 1 - the index was not updated like it should have been, as the default for
CtagsInterface is to update on save. (Check the touch time on the tags file, or just
grep for a tag in the file to prove it still points to the old location.)
Problem 2 - CtagsSideKick now thinks you are pointing to a different tag. Click on
the same tag word in the source file as before (KEYWORD_BOOLEAN for example) and observe
that the SideKick dockable thinks you are pointing to a different tag (KEYWORD_DOUBLE
for me, which happens to be exactly five lines below KEYWORD_BOOLEAN, and I added
five lines.)
Force the SideKick to update by clicking the refresh button in the dockable and it
will be back in sync.
Now force the tags file to update by selecting Update project in tag index from the
context menu in Project Viewer.
Problem 3 - Observe in the Tag Preview that the tag now appears to be found twice
in each file that it really appears in, once at the old location (clicking on this
line of the preview dockable will take you to the wrong line) and once at the correct
new location.
If you then add a couple more blank lines, save, and for a re-index, you will now
see a 3rd entry in the Tag Preview.
There is really only one entry in the tags file, which you can prove by grepping the
tags file, and it appears to have been updated to the new location, so it seems that
the CtagsInterface is keeping its own private copy, and only adding the new location
to the list during the update.
If you now Remove project from tag index, and re-add it, everything goes back to working,
with both SideKick and Tag Preview agreeing with the one and only correct location
for the tag... until you edit the file again.
Submitted | snarum-micron - 2013-12-30 18:57:22.413000 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | CtagsInterface CtagsSideKick |
Status | open | Group | None |
Resolution | None |
2013-12-31 20:32:03.155000 ezust |
Please separate the issues of each plugin to a separate ticket. It does nobody any favors to combine tickets for 2 different plugins into the same ticket. |
---|---|
2014-01-01 16:17:51.365000 snarum-micron |
I suspect these are one and the same root cause, which us why I put it all in one ticket. I'll duplicate the above in a second ticket and tag one for each plugin if that makes it easier. |
2014-01-02 17:59:05.645000 snarum-micron |
An additional data point. I found that if I use the Plugins > CtagsInterface > Tag
This Project menu item instead of the Update project in tag index from Project Viewer,
it doesn't have the same problem. There is only one (correct) tag entry shown in
the preview.
|